﻿<Window x:Class="ViCode_LeVi.WindowEditInfo"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:ViCode_LeVi"
    xmlns:vmcontrol="clr-namespace:ViCode_LeVi.Controls"
        xmlns:Langs="clr-namespace:ViCode_LeVi.Langs" 
        xmlns:Data="clr-namespace:ViCode_LeVi.Data"  Icon="/Swiss Create;component/logo.ico"
       
    Title="{Binding Source={x:Static Langs:ControlTextInfo.Intance}, Path=Application_Title}"  WindowState="Maximized" >
    <Window.Resources>
        <BooleanToVisibilityConverter  x:Key="BooleanToVisibilityConverter" />
    </Window.Resources>
    <DockPanel LastChildFill="True">
        <ToolBar DockPanel.Dock="Top" HorizontalAlignment="Stretch" VerticalAlignment="Top">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                </Grid.RowDefinitions>
                
            
            <Menu>
                <Menu.Items>
                    <MenuItem Margin="2" >
                        <MenuItem.Header>
                            <vmcontrol:VMTextBlockMenu Text="{Binding Source={x:Static Langs:ControlTextInfo.Intance}, Path=Menu_Project}"/>
                        </MenuItem.Header>
                        <MenuItem.Items>
                            
                            <MenuItem  InputGestureText="Ctrl+S"  Name="MenuItem_Save" Click="MenuItem_Save_Click" >
                                <MenuItem.Header>
                                    <vmcontrol:VMTextBlockMenu Text="{Binding Source={x:Static Langs:ControlTextInfo.Intance}, Path=Menu_Project_Save}"/>
                                </MenuItem.Header>
                                <MenuItem.Icon>
                                    <Image Width="20" Height="20" Source="/Swiss Create;component/Images/save.png" />
                                </MenuItem.Icon>
                            </MenuItem>
                            
                            <!--<MenuItem  InputGestureText="Ctrl+E"  Name="MenuItem_Quit" Click="MenuItem_Quit_Click">
                                <MenuItem.Header>
                                    <vmcontrol:VMTextBlockMenu Text="Exit"/>
                                </MenuItem.Header>
                                <MenuItem.Icon>
                                    <Image Width="20" Height="20" Source="/Swiss Create;component/Images/quit.png" />
                                </MenuItem.Icon>
                            </MenuItem>-->
                        </MenuItem.Items>
                    </MenuItem>
                    <MenuItem  Margin="2">
                        <MenuItem.Header>
                            <vmcontrol:VMTextBlockMenu Text="Edit"/>
                        </MenuItem.Header>
                        <MenuItem.Items>
                            <MenuItem Header="Cu_t" Command="ApplicationCommands.Cut"  InputGestureText="Ctrl+X" />
                            <MenuItem Header="_Copy" Command="ApplicationCommands.Copy"  InputGestureText="Ctrl+C"/>
                            <MenuItem Header="_Paste" Command="ApplicationCommands.Paste"  InputGestureText="Ctrl+V"/>
                            <MenuItem Header="_Undo" Command="ApplicationCommands.Undo"  InputGestureText="Ctrl+Z"/>
                            <MenuItem Header="_Redo" Command="ApplicationCommands.Redo"  InputGestureText="Ctrl+Y"/>
                        </MenuItem.Items>
                    </MenuItem>
                    <!--Chang hieu vi sao gan them doan menu nay thi TabItems ben duoi at het datacontext-->
                    <!--<MenuItem Name="MenuItem_Operation" >
                        <MenuItem.Header>
                            <vmcontrol:VMTextBlockMenu Text="{Binding Source={x:Static Langs:ControlTextInfo.Intance}, Path=Menu_Operation}"/>
                        </MenuItem.Header>
                        <MenuItem.Items>
                            <MenuItem DataContext="{Binding Path=Steps[10]}" IsCheckable="True" IsChecked="{Binding IsCurrent}">
                                <MenuItem.Header>
                                    <vmcontrol:VMTextBlockMenu Text="{Binding MenuText}"/>
                                </MenuItem.Header>
                                <MenuItem.Icon>
                                    <Image Width="20" Height="20" Source="/Swiss Create;component/Images/Numbers/0.png" />
                                </MenuItem.Icon>
                            </MenuItem>
                            <MenuItem DataContext="{Binding Path=Steps[0]}" IsCheckable="True" IsChecked="{Binding IsCurrent}">
                                <MenuItem.Header>
                                    <vmcontrol:VMTextBlockMenu Text="{Binding MenuText}"/>
                                </MenuItem.Header>
                                <MenuItem.Icon>
                                    <Image Width="20" Height="20" Source="/Swiss Create;component/Images/Numbers/1.png" />
                                </MenuItem.Icon>
                            </MenuItem>
                            <MenuItem DataContext="{Binding Path=Steps[1]}"  IsCheckable="True" IsChecked="{Binding IsCurrent}">
                                <MenuItem.Header>
                                    <vmcontrol:VMTextBlockMenu Text="{Binding MenuText}"/>
                                </MenuItem.Header>
                                <MenuItem.Icon>
                                    <Image Width="20" Height="20" Source="/Swiss Create;component/Images/Numbers/2.png" />
                                </MenuItem.Icon>
                            </MenuItem>
                            <MenuItem DataContext="{Binding Path=Steps[2]}"  IsCheckable="True" IsChecked="{Binding IsCurrent}">
                                <MenuItem.Header>
                                    <vmcontrol:VMTextBlockMenu Text="{Binding MenuText}"/>
                                </MenuItem.Header>
                                <MenuItem.Icon>
                                    <Image Width="20" Height="20" Source="/Swiss Create;component/Images/Numbers/3.png" />
                                </MenuItem.Icon>
                            </MenuItem>
                            <MenuItem DataContext="{Binding Path=Steps[3]}"  IsCheckable="True" IsChecked="{Binding IsCurrent}">
                                <MenuItem.Header>
                                    <vmcontrol:VMTextBlockMenu Text="{Binding MenuText}"/>
                                </MenuItem.Header>
                                <MenuItem.Icon>
                                    <Image Width="20" Height="20" Source="/Swiss Create;component/Images/Numbers/4.png" />
                                </MenuItem.Icon>
                            </MenuItem>
                            <MenuItem DataContext="{Binding Path=Steps[4]}"  IsCheckable="True" IsChecked="{Binding IsCurrent}">
                                <MenuItem.Header>
                                    <vmcontrol:VMTextBlockMenu Text="{Binding MenuText}"/>
                                </MenuItem.Header>
                                <MenuItem.Icon>
                                    <Image Width="20" Height="20" Source="/Swiss Create;component/Images/Numbers/5.png" />
                                </MenuItem.Icon>
                            </MenuItem>
                            <MenuItem DataContext="{Binding Path=Steps[5]}"  IsCheckable="True" IsChecked="{Binding IsCurrent}">
                                <MenuItem.Header>
                                    <vmcontrol:VMTextBlockMenu Text="{Binding MenuText}"/>
                                </MenuItem.Header>
                                <MenuItem.Icon>
                                    <Image Width="20" Height="20" Source="/Swiss Create;component/Images/Numbers/6.png" />
                                </MenuItem.Icon>
                            </MenuItem>
                            <MenuItem DataContext="{Binding Path=Steps[6]}"  IsCheckable="True" IsChecked="{Binding IsCurrent}">
                                <MenuItem.Header>
                                    <vmcontrol:VMTextBlockMenu Text="{Binding MenuText}"/>
                                </MenuItem.Header>
                                <MenuItem.Icon>
                                    <Image Width="20" Height="20" Source="/Swiss Create;component/Images/Numbers/7.png" />
                                </MenuItem.Icon>
                            </MenuItem>
                            <MenuItem DataContext="{Binding Path=Steps[7]}"  IsCheckable="True" IsChecked="{Binding IsCurrent}">
                                <MenuItem.Header>
                                    <vmcontrol:VMTextBlockMenu Text="{Binding MenuText}"/>
                                </MenuItem.Header>
                                <MenuItem.Icon>
                                    <Image Width="20" Height="20" Source="/Swiss Create;component/Images/Numbers/8.png" />
                                </MenuItem.Icon>
                            </MenuItem>
                            <MenuItem DataContext="{Binding Path=Steps[9]}"  IsCheckable="True" IsChecked="{Binding IsCurrent}">
                                <MenuItem.Header>
                                    <vmcontrol:VMTextBlockMenu Text="{Binding MenuText}"/>
                                </MenuItem.Header>
                                <MenuItem.Icon>
                                    <Image Width="20" Height="20" Source="/Swiss Create;component/Images/Numbers/9.png" />
                                </MenuItem.Icon>
                            </MenuItem>
                            <MenuItem DataContext="{Binding Path=Steps[8]}"  IsCheckable="True" IsChecked="{Binding IsCurrent}">
                                <MenuItem.Header>
                                    <vmcontrol:VMTextBlockMenu Text="{Binding MenuText}"/>
                                </MenuItem.Header>
                                <MenuItem.Icon>
                                    <Image Width="20" Height="20" Source="/Swiss Create;component/Images/Numbers/10.png" />
                                </MenuItem.Icon>
                            </MenuItem>
                        </MenuItem.Items>
                    </MenuItem>-->
                    <MenuItem Name="MenuItem_Help" >
                        <MenuItem.Header>
                            <vmcontrol:VMTextBlockMenu Text="Help"/>
                        </MenuItem.Header>
                        <MenuItem.Items>
                            <MenuItem InputGestureText="F1" Name="MenuItem_HelpIndex" Click="MenuItem_HelpIndex_Click" >
                                <MenuItem.Header>
                                    <vmcontrol:VMTextBlockMenu Text="Help Index"/>
                                </MenuItem.Header>
                            </MenuItem>
                            <!--<MenuItem  Name="MenuItem_AboutUs"  Click="MenuItem_AboutUs_Click" >
                                <MenuItem.Header>
                                    <vmcontrol:VMTextBlockMenu Text="About us"/>
                                </MenuItem.Header>

                            </MenuItem>-->
                        </MenuItem.Items>
                    </MenuItem>
                    <!--<MenuItem Name="MenuItem_Lang" Header="{Binding Source={x:Static Langs:ControlTextInfo.Intance}, Path=Menu_Lang}">
                        <MenuItem Header="{Binding Source={x:Static Langs:ControlTextInfo.Intance}, Path=Menu_Lang_VI}" IsCheckable="True" IsChecked="{Binding Is_Lang_VI}"/>
                        <MenuItem Header="{Binding Source={x:Static Langs:ControlTextInfo.Intance}, Path=Menu_Lang_EN}" IsCheckable="True" IsChecked="{Binding Is_Lang_EN}"/>
                    </MenuItem>-->
                </Menu.Items>
            </Menu>
           
            <vmcontrol:VMTabTextBoxFormatInfo Grid.Row="1"/>
          </Grid>
        </ToolBar>
        
        <StatusBar DockPanel.Dock="Bottom" HorizontalAlignment="Stretch" VerticalAlignment="Bottom">

        </StatusBar>

        <TabControl Name="TabControl_Root">
            <TabControl.Resources>
                <SolidColorBrush x:Key="TabItemBG" Color="#B3001A"/>
            </TabControl.Resources>
            
            <TabItem  Background="{StaticResource TabItemBG}" Name="TabItem_Step1" DataContext="{Binding Path = Steps[0]}">
                <TabItem.Header>
                    <vmcontrol:VMTextBlockExt_ControlTextInfoInData DockPanel.Dock="Top" TextPath="Risk_Impact_Sort_Header" Margin="2"/>
                </TabItem.Header>
                <TabItem.Content>
                    <DockPanel LastChildFill="True">
                        <DockPanel DockPanel.Dock="Top" >
                            <vmcontrol:VMTextBlockExt_ControlTextInfoInData DockPanel.Dock="Left" TextPath="Risk_Impact_Full_Header" Margin="2,10,2,10"/>
                            <vmcontrol:VMTabHeader />
                            
                        </DockPanel>
                        <DockPanel  Margin="2">
                            <ListView Name="ListView_Enum_Impact_Items" Grid.Column="1" Grid.Row="0" 
                              
                              SelectionMode="Single">
                                <ListView.View>
                                    <GridView>
                                       
                                        <GridViewColumn DisplayMemberBinding="{Binding Mark}">
                                            <GridViewColumn.Header>
                                                <vmcontrol:VMTextBlockExt_ControlTextInfoInData TextPath="RiskManagement_EnumData_ID_Text"/>
                                            </GridViewColumn.Header>
                                        </GridViewColumn>
                                        
                                        
                                        <GridViewColumn x:Name="GridViewColumn_Manage">
                                            <GridViewColumn.Header>
                                                <vmcontrol:VMTextBlockExt_ControlTextInfoInData TextPath="RiskManagement_EnumData_Name_Text"/>
                                            </GridViewColumn.Header>
                                            <GridViewColumn.CellTemplate>
                                                <DataTemplate>
                                                    <vmcontrol:VMTextBox  Text="{Binding sName}" VerticalAlignment="Center"  />
                                                </DataTemplate>
                                            </GridViewColumn.CellTemplate>
                                        </GridViewColumn>

                                    </GridView>
                                </ListView.View>
                            </ListView>
                        </DockPanel>
                    </DockPanel>
                </TabItem.Content>
            </TabItem>
            <TabItem  Background="{StaticResource TabItemBG}" Name="TabItem_Step2" >
                <TabItem.Header>
                    <vmcontrol:VMTextBlockExt_ControlTextInfoInData DockPanel.Dock="Top" TextPath="Risk_Probability_Sort_Header" Margin="2"/>
                </TabItem.Header>
                <TabItem.Content>
                    <DockPanel LastChildFill="True">
                        <DockPanel DockPanel.Dock="Top" >
                            <vmcontrol:VMTextBlockExt_ControlTextInfoInData DockPanel.Dock="Left" TextPath="Risk_Probability_Full_Header" Margin="2,10,2,10"/>
                            <vmcontrol:VMTabHeader />

                        </DockPanel>
                        <ListView Name="ListView_Enum_Probability_Items" Grid.Column="1" Grid.Row="0" 
                              SelectedItem="{Binding IM_Current_Task}"
                                ItemsSource="{Binding Tasks_Source}"
                              SelectionMode="Single">
                            <ListView.View>
                                <GridView>

                                    <GridViewColumn DisplayMemberBinding="{Binding Mark}">
                                        <GridViewColumn.Header>
                                            <vmcontrol:VMTextBlockExt_ControlTextInfoInData TextPath="RiskManagement_EnumData_ID_Text"/>
                                        </GridViewColumn.Header>
                                    </GridViewColumn>


                                    <GridViewColumn >
                                        <GridViewColumn.Header>
                                            <vmcontrol:VMTextBlockExt_ControlTextInfoInData TextPath="RiskManagement_EnumData_Name_Text"/>
                                        </GridViewColumn.Header>
                                        <GridViewColumn.CellTemplate>
                                            <DataTemplate>
                                                <vmcontrol:VMTextBox  Text="{Binding sName}" VerticalAlignment="Center"  />
                                            </DataTemplate>
                                        </GridViewColumn.CellTemplate>
                                    </GridViewColumn>

                                </GridView>
                            </ListView.View>
                        </ListView>

                    </DockPanel>
                </TabItem.Content>
            </TabItem>
           
                
        </TabControl>
    </DockPanel>
</Window>
